package com.ccrfid.rmc6.service.personnel;

import com.ccrfid.rmc6.appconfig.exception.pojo.AppException;
import com.ccrfid.rmc6.entity.personnel.*;
import com.ccrfid.rmc6.lbservice3.pojo.msg.MsgBloodPressure;
import com.ccrfid.rmc6.lbservice3.pojo.msg.MsgHeartRate;
import com.ccrfid.rmc6.lbservice3.pojo.msg.MsgStepTrack;
import com.ccrfid.rmc6.lbservice3.pojo.msg.MsgTemperature;

import java.sql.Timestamp;
import java.util.List;
import java.util.Map;

public interface PersonnelVitalSignService {

    //记录心率
    PersonnelHeartRateEntity recordHeartRate(Long personnelId, MsgHeartRate msgHeartRate);

    //记录步数
    PersonnelStepTrackEntity recordStepTrack(Long personnelId, MsgStepTrack msgStepTrack);

    //记录体温
    PersonnelTemperatureEntity recordTemperature(Long personnelId, MsgTemperature msgTemperature);

    //记录血压
    PersonnelBloodPressureEntity recordBloodPressure(Long personnelId, MsgBloodPressure msgBloodPressure);

    //获取账号关注的生命体征人员
    List<PersonnelView> getAllPersonnelsWithVitalSignFocus(String account);

    //给账号添加某个生命体征关注人员
    Boolean createVitalSignFocusPersonnel(String account, Long personnelId) throws AppException;

    //删除某账号的某个生命体征关注人员
    Boolean deleteVitalSignFocusPersonnel(String account, Long personnelId) throws AppException;

    //获取某个人某段时间计步数
    Integer getPersonnelStepCount(Long personnelId, Timestamp startTime, Timestamp stopTime);

    //获取某个人某段时间心率记录
    List<PersonnelHeartRateEntity> getPersonnelHeartRateRecords(Long personnelId, Timestamp startTime, Timestamp stopTime);

    //获取某个时间心率有异常的人员列表
    List<PersonnelView> getAllPersonnelsWithAbnormalHeartRate(Long orgId, Timestamp checkTime);

    //获取心率正常值范围
    Map<String, Integer> getNormalHeartRateValueRange();

    //8.获取某人最新心率数据
    PersonnelHeartRateEntity getPersonnelRecentHeartRate(Long personnelId);

    //9.获取某人某段时间内的心率数据
    List<PersonnelHeartRateEntity> getPersonnelHeartRateList(Long personnelId, Timestamp startTime, Timestamp stopTime);

    //10.获取某人某段时间内的计步数据
    Integer getPersonnelStepCountData(Long personnelId, Timestamp startTime, Timestamp stopTime);

    //11.获取某人最新体温数据
    PersonnelTemperatureEntity getPersonnelRecentTemperature(Long personnelId);

    //12.获取某人某段时间内的体温数据
    List<PersonnelTemperatureEntity> getPersonnelTemperatureList(Long personnelId, Timestamp startTime, Timestamp stopTime);

    //13.获取某人最新血压数据
    PersonnelBloodPressureEntity getPersonnelRecentBloodPressure(Long personnelId);

    //14.获取某人某段时间内的血压数据
    List<PersonnelBloodPressureEntity> getPersonnelBloodPressureList(Long personnelId, Timestamp startTime, Timestamp stopTime);

}
